package org.xteam.sled.matcher;

import java.util.HashMap;
import java.util.Map;

import org.xteam.sled.model.AbsoluteField;

public class VarState {
	
	private Map<String, AbsoluteField> state = new HashMap<String, AbsoluteField>();

	public String varFor(AbsoluteField f) {
		String v = "{" + f.field().name() + " at " + f.offset() + "}";
		state.put(v, f);
		return v;
	}
	
	public AbsoluteField fieldFor(String v) {
		return state.get(v);
	}

}
